import request from '@/utils/request'

const baseUrl = process.env.VUE_APP_BASE_API + '/team'

export function listTeam() {
  return request({
    url: `${baseUrl}`,
    method: 'get'
  })
}

export function addTeam(data) {
  return request({
    url: baseUrl,
    method: 'post',
    data
  })
}

export function updateTeam(data) {
  return request({
    url: baseUrl,
    method: 'put',
    data
  })
}

export function deleteTeam(teamId) {
  return request({
    url: baseUrl,
    method: 'delete',
    params: {
      id: teamId
    }
  })
}
